//
//  GYHomeSaleViewModel.m
//  GYDemo
//
//  Created by Mrzhang on 2018/3/29.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "GYHomeSaleViewModel.h"
#import "Head.h"
@implementation GYHomeSaleViewModel
#pragma mark - getter and setter
-(NSMutableArray *)datas
{
    if (!_datas) {
        _datas = [NSMutableArray new];
    }
    return _datas;
}

#pragma mark - method
-(void)requestDatas:(NSMutableDictionary *)para
{
    @WeakSelf;
    NSString *interface = @"UVTGetGoodList";
    [[InterfaceManager shareInterface]requetInterface:interface withParameter:para handler:^(NSDictionary *info, InterfaceStatusModel *infoModel) {
        NSArray* PParr=(NSArray*)info;
        NSMutableArray * arr = [NSMutableArray new];
        
        for (NSDictionary *dic in PParr) {
            GYHomeBuyProductInfoModel *model = [GYHomeBuyProductInfoModel yy_modelWithJSON:dic];
            [arr addObject:model];
        }
        [selfp setDatas:arr];
    }];
}

@end
